#!/bin/sh
################################################################
#更新docker 版本docker
################################################################


cur_dir=$(cd `dirname $0`; pwd)
conf_file=$cur_dir/app.conf
hostname=`hostname`
tmp_dir=`cat $conf_file|grep ${hostname}.ops_dir|awk -F "=" '{print $2}'`
jar_dir=`cat $conf_file|grep ${hostname}.jar_dir|awk -F "=" '{print $2}'`
ops_jar_dir=`cat $conf_file|grep ${hostname}.ops_jar_dir|awk -F "=" '{print $2}'`
ops=$ops_jar_dir/ops.jar.1
ops_node_file="$tmp_dir/ops.node"
JAVA=java
ops_conf="/tmp/ops.conf"

echo "">$ops_conf
echo "cd /app/app/docker                 ">>$ops_conf
echo "sh build.sh app  2.9.1.5            ">>$ops_conf
echo "cd /app/app/docker/db_dev  ">>$ops_conf
echo "docker-compose up -d  ">>$ops_conf
$JAVA  -jar $ops -e action -n $ops_node_file -c $ops_conf




exit 0






